﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admincp/Site.master" AutoEventWireup="true" CodeFile="Stalls.aspx.cs" Inherits="admincp_Stalls" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style>
        .layout {
            background:#4c5e51;
        }
        .layout h2 { margin-left: 40px; padding-left: 0.1em; font-size: 2em; line-height: 1em; font-size:40px;
			font-family: Arial, Helvetica, sans-serif;
			color: #504f4f;
			text-shadow: 0px 2px 1px #333;
        }
        .manager {
            clear: both;
            width: 100%;
            margin-left: 20px;
            width:950px;
            padding-bottom:10px;
        }
        footer {
            clear:both;
            text-align:right;
            padding-top:30px;
            padding-bottom:20px;
            background:#0d0d0d;
        }
        .auto-style1 {
            width: 112px;
        }

        .hidden {
            display:none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h2>Trang Quản Lý Gian Hàng</h2>
    <div class="manager">
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" >
            <ProgressTemplate>
                Đang xử lý dữ liệu...
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                
                    <asp:Panel ID="pnCategory" runat="server" GroupingText="Mục Nhập Thông Tin Chủng Loại">
                    <table>
                <tr>
                    <asp:HiddenField ID="txtID" runat="server"/>
                    <td class="auto-style1">Tên Gian Hàng</td>
                    <td><asp:TextBox ID="txtName" Width="130" runat="server" />
                        <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtName" Display="Dynamic" ErrorMessage="Tên chủng loại không được rỗng" SetFocusOnError="True" >*</asp:RequiredFieldValidator>
                    </td>
                    <td>Mô tả</td>
                    <td><asp:TextBox ID="txtDesc" Width="130" runat="server" />
                        <asp:RequiredFieldValidator ID="rfvDesc" runat="server" ControlToValidate="txtDesc" Display="Dynamic" ErrorMessage="Mô tả không được rỗng" SetFocusOnError="True" >*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style1">Trạng thái</td>
                    <td colspan="3" align="left">
                        <asp:RadioButtonList ID="rbtnStatus" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Enabled="true" Selected="True" Text="Hiện" Value="1"></asp:ListItem>
                            <asp:ListItem Text="Ẩn" Value="0" />
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </table>
        </asp:Panel><br />
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" /><br />
        <span class="button-met dark"><asp:Button ID="btnInsert" Text="Thêm Mới" runat="server" CssClass="button" BorderWidth="0px" OnClick="btnInsert_Click" /></span>&nbsp;
        <span class="button-met dark"><asp:Button ID="btnUpdate" Text="Cập Nhật" runat="server" CssClass="button" BorderWidth="0px" OnClick="btnUpdate_Click" /></span>
        <br />
        <br />
        <asp:GridView ID="gvStalls" runat="server"  AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" Width="947px" OnSelectedIndexChanging="gvStalls_SelectedIndexChanging" OnRowDeleting="gvStalls_RowDeleting" OnPageIndexChanging="gvStalls_PageIndexChanging" PageSize="4" AllowPaging="true">
            <Columns>
                <asp:BoundField HeaderText="ID" DataField="id" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"/>
                <asp:BoundField HeaderText="Name" DataField="name" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"/>
                <asp:HyperLinkField DataTextField="name"
                    HeaderText="Quầy Hàng"
                    DataNavigateUrlFields="id"
                    DataNavigateUrlFormatString="ctquayhang/{0}"
                    NavigateUrl="~/ctquayhang" />
                <asp:BoundField HeaderText="Mô Tả" DataField="description" />
                <asp:BoundField HeaderText="Trạng Thái" DataField="status" ItemStyle-HorizontalAlign="Center"/>
                <asp:CommandField SelectText="Sửa" ShowSelectButton="True"/>
                <asp:CommandField DeleteText="Xoá" ShowDeleteButton="true" />
            </Columns>
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
            <RowStyle BackColor="White" ForeColor="#330099" VerticalAlign="Top" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            <SortedAscendingCellStyle BackColor="#FEFCEB" />
            <SortedAscendingHeaderStyle BackColor="#AF0101" />
            <SortedDescendingCellStyle BackColor="#F6F0C0" />
            <SortedDescendingHeaderStyle BackColor="#7E0000" />
        </asp:GridView>
                </ContentTemplate>
            </asp:UpdatePanel>
            
    </div>
</asp:Content>

